#ifndef NETLIB_TIMERID_H
#define NETLIB_TIMERID_H

// 定时器中间类，用户可见

#include "copyable.h"

namespace netlib
{

namespace net
{

class Timer;

class TimerId : public netlib::copyable
{
public:
    TimerId() : timer_(NULL), sequence_(0)
    { }

    TimerId(Timer* timer, int64_t seq) : timer_(timer), sequence_(seq)
    { }

    friend class TimerQueue;

private:
    Timer* timer_;          // 定时器序号
    int64_t sequence_;      // 定时器地址

}; // class TimerId end

} // namespace net end

} // namespace netlib end

#endif 